<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/basproject/basicdata/Bas_Version.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/basproject/basicdata/Bas_Version.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Bas_Version",
        setup() {
            const table = ref({
                key: "VersionId",
                footer: "Foots",
                cnName: "APP管理",
                name: "basicdata/Bas_Version",
                newTabEdit: false,
                url: "/Bas_Version/",
                sortName: "VersionId"
            });
            const editFormFields = ref({"AppId":"","AppName":"","Version":"","Enabled":"","InstallType":"","Os":"","WgtUrl":"","PkgUrl":"","VersionNotes":""});
            const editFormOptions = ref([[{"title":"APP代号","required":true,"field":"AppId"},
                               {"title":"APP名称","field":"AppName"}],
                              [{"title":"APP版本号","required":true,"field":"Version"},
                               {"dataKey":"enabled","data":[],"title":"是否启用","field":"Enabled","type":"switch"}],
                              [{"dataKey":"BASE_InstallType","data":[],"title":"安装类型 ","field":"InstallType","type":"select"},
                               {"dataKey":"BASE_OsType","data":[],"title":"操作系统","field":"Os","type":"select"}],
                              [{"title":"全量APP地址","field":"PkgUrl"},
                               {"title":"增量资源包地址","field":"WgtUrl"}],
                              [{"title":"版本更新说明","field":"VersionNotes","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"AppId":"","AppName":""});
            const searchFormOptions = ref([[{"title":"APP名称","field":"AppName"},{"title":"APP代号","field":"AppId"}]]);
            const columns = ref([{field:"VersionId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppId",title:"APP代号",type:"string",width:180,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"AppName",title:"APP名称",type:"string",link:true,width:180,showOverflowTooltip:true,align:"left"},
                       {field:"Version",title:"APP版本号",type:"string",width:120,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"WgtUrl",title:"增量资源包地址",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"PkgUrl",title:"全量APP地址",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"InstallType",title:"安装类型 ",type:"int",bind:{ key:"BASE_InstallType",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"VersionNotes",title:"版本更新说明",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"Os",title:"操作系统",type:"string",bind:{ key:"BASE_OsType",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"是否启用",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
